package com.situ.day7.cal;

import org.junit.Test;

public class Demo {

    @Test
    public void test1() {
        Add add = new Add(3, 5);
        int result1 = add.getResult();
        System.out.println(result1);

        Cal cal = new Add(3, 5);
        int result2 = cal.getResult();
        System.out.println(result2);

        cal = new Sub(3, 5);
        int result3 = cal.getResult();
        System.out.println(result3);
    }

    @Test
    public void test2() {
        //'Cal' is abstract; cannot be instantiated
        //Cal cal = new Cal();
    }
}
